package com.audaque.springboot.foshanupload.web.servletdemo.config;

import org.springframework.context.annotation.Configuration;

/**
 * @author zgb
 * @desc ...
 * @date 2023-07-20 03:35:47
 */

@Configuration
public class ServletRegistConfig {
    //方式2：将servlet 添加到springboot容器中 ，优先于注解@WebServlet
/*
    @Bean
    public ServletRegistrationBean<HelloServlet> helloServlet() {
        ServletRegistrationBean<HelloServlet> bean = new ServletRegistrationBean<>(new HelloServlet(),"/servlet/hello");
        bean.setLoadOnStartup(1);
        return bean;
    }
     @Bean
    public ServletRegistrationBean<ScopeServlet> scopeServlet() {
        ServletRegistrationBean<ScopeServlet> bean = new ServletRegistrationBean<>(new ScopeServlet(),"/servlet/scope");
        bean.setLoadOnStartup(1);
        return bean;
    }

*/
}
